import jdk.swing.interop.SwingInterOpUtils;

public class demo2 {
    public static void main(String[] args) {
        PencilwithEraser people=new PencilwithEraser();
        people.write();
        people.clean();
    }
}
class Pencil{
    public void write() {
        System.out.println("写东西");
    }
}
interface Eraser{
    public abstract void clean();
}
class PencilwithEraser extends Pencil implements Eraser{
    public void clean() {
        System.out.println("擦除");
    }
}